<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>添加</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/validate.jspf"%>
<%@include file="/resource/common/showLoading.jspf"%>
<%@include file="/resource/common/wdate-picker.jspf"%>
<%@include file="/resource/common/color.jspf"%>
<%@include file="/resource/common/kindeditor.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/asyncDoSubmitForm.js"></script>
<script type="text/javascript">
var PATH = "${ctx}";
var result = 0;
var validateForm;

$(document).ready(function() {
	$("body").showLoading();
	validateForm = $("#inputForm").validate({
		rules : {
			title : {
				required : true
			},
			timeStartStr : {
				required : true
			},
			timeEndStr : {
				required : true
			},
			confcolor : {
				required : true
			}
		},
		messages : {
			title : {
				required : "标题不能为空"
			},
			timeStartStr : {
				required : "开始时间不能为空"
			},
			timeEndStr : {
				required : "结束时间不能为空"
			},
			confcolor : {
				required : "颜色不能为空"
			}
		},
		errorElement : "em",
		errorClass : "validate_error",
		submitHandler: function(form) { //通过之后回调
		},
		invalidHandler: function(form, validator) {
			return false;
		}
	});
	$("body").hideLoading();
	$('#confcolor_change').colpick({
        onSubmit:function(hsb,hex,rgb,el,bySetColor) {
            $(el).val('#'+hex);
            $("#confcolor").val('#'+hex);
            $(el).colpickHide();
        }
    });
});

</script>
</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box" >
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<fieldset>
							<input type="hidden" id="asyncResult" name="asyncResult" value="-1" />
							<input type="hidden" id="asyncResultData" name="asyncResultData" value="-1" /> 
							<input type="hidden" id="asyncResultError" name="asyncResultError" value="-1" /> 
							
							<form:form id="inputForm" name="form1" class="form-horizontal" method="post" action="addBmFullcalendar.do" modelAttribute="BmFullcalendar">
								<div class="row">
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<input type="hidden" id="id" name="id" value="${entity.id}" /> 
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">标题:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.title}" name="title" id="title"  placeholder="标题"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">开始时间:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" onfocus="dateUtils.showDate_YMDHMS(2,'timeEndStr')" value="${entity.timeStartStr}" name="timeStartStr" id="timeStartStr"  placeholder="开始时间"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">颜色:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="color"  value="${entity.confcolor}" class="form-control input-sm" style="padding: 0px;" id="confcolor_change"  placeholder="颜色"/>
											</div>
										</div>
									</div>
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">状态:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="status" id="status" class="form-control input-sm">
													<option value="1" <c:if test="${entity.status==1 }">selected="selected"</c:if>>正常</option>
													<option value="0" <c:if test="${entity.status==0}">selected="selected"</c:if>>删除</option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">结束时间:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" onfocus="dateUtils.showDate_YMDHMS(1,'timeStartStr')" value="${entity.timeEndStr}" name="timeEndStr" id="timeEndStr"  placeholder="结束时间"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">颜色值:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text"  value="${entity.confcolor}" class="form-control input-sm" name="confcolor" id="confcolor"  placeholder="颜色"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12 col-sm-12 col-xs-12" >
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">内容</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<textarea rows="7" cols="" name="content" id="content" class="form-control input-sm"  placeholder="内容"></textarea>
											</div>
										</div>
									</div>
								</div>
							</form:form>
						</fieldset>
					</div>
				</div>
				<!-- End .content-box-content -->
			</div>
		</div>
		<!-- End #main-content -->
	</div>
</body>
<!-- Download From www.exet.tk-->
</html>